# -*- coding:utf-8 -*-
print(type(set()),type({})) #(<type 'set'>, <type 'dict'>)

# 集合元素不重复
sets = {'a','b','c', 'a'}
print(sets) # set(['a', 'c', 'b'])

# in 判断
print('a' in sets)

#
sets2 = set('abcdabc')
print(sets2) # set(['a', 'c', 'b', 'd'])

set3 = {1,2,3}
set4 = {2,3,4}
# 交集
print(set3 & set4) # set([2, 3])

# 并集
print(set3 | set4) # set([1, 2, 3, 4])

# 差集
print(set3 - set4) # set([1])
